//
//  ContactArrayController.m
//  Annuaire
//
//  Created by Jordan SARRE MOLINES on 04/12/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import "ContactArrayController.h"
#import "Contact.h"

@implementation ContactArrayController


- (id)init
{
    self = [super init];
    if (self) {
        // Initialization code here.
    }
    
    return self;
}

-(void)awakeFromNib {
    NSLog(@"PersonArrayController awakeFromNib:");
    
    NSMutableArray * newContacts = [NSMutableArray arrayWithCapacity: 3];
    
    Contact * contact= nil;
    
    contact = [[Contact alloc] init];
    contact.prenom = @"Paul";
    contact.nom = @"Bonhomme";
    
    [newContacts addObject: contact];
    [contact autorelease];
    
    contact = [[Contact alloc] init];
    contact.prenom = @"Pierre";
    contact.nom = @"Marchefeu";
    
    [newContacts addObject: contact];
    [contact autorelease];
    
    contact = [[Contact alloc] init];
    contact.prenom = @"Jean";
    contact.nom = @"Silvestre";
    
    [newContacts addObject: contact];
    [contact autorelease];
    
    [self addObjects: newContacts];
    
    NSLog(@"%@", [self content]);
}


@end
